This topic describes generated Process attributes, their associated Role Attributes and any worker Thread overrides. For an overview of CLIP processes see Processes. For a more detailed discussion of Cache and Heap Memory see Memory Management. For details of entering/editing Blueprint process attributes see Creating an Autonomous Process.
NB. Memory sizes below are specified in bytes. However a macro is provided in the ProjectHeader.hpp file to covert from Megabytes to Bytes. Thus values of MB(xx) can be specified
eg. MB(256) represents 268435456 bytes.
Process Attributes
Default Scheduling Attributes
Initial Worker Count
Determines initial worker thread concurrency. It is usually defaulted to the processor's core count' (ClpNumProcessors() ) for deliverable software, which means that the number of workers will be determined at runtime and automatically scale to the target platform. However, it is often set to '1' for initial development because this will make execution more repeatable (albeit slower). The scheduler can increase the number of Workers upto the Max Worker Count.
Max Worker Count
Determines the maximum number of workers that the system can create at any given priority. If a process contains methods whose manual connections can block (e.g. a write to a transient store), then the scheduler may need to create additional threads if it detects potential deadlocks. This attribute determines the maximum number of workers that can be created and is usually set to be 'Unlimited'.
Definition Attributes
Type
Process type which is used to construct the generated class name. This needs to be 'unique' within the process in order to avoid clashes with other class types that share a common 'Name Space'.
Main Thread Attributes
Cache Size
Memory Cache size allocated for the Main Thread. Default uses a proportion of the Heap Size depending on the Optimization. Cache size should be smaller than Heap Size. Generally a larger cache gives better performance, but at the expense of the Heap.
Heap Optimization
Heap Optimization specifies which optimization algorithm should be used, ie for speed 'Fast' or size 'Small'. The default value is Inherited from the Process Role.
Heap Size
Memory Heap size allocated for the Main Thread. 1 Mb is usually sufficient for non-GUI or simple GUI applications.
Heap Timeliness
Timeliness controls the way memory is allocated. When set to Real-time, operations are guaranteed to complete within a particular worst case time, whereas Offline operations no deadlines are guaranteed. The Real-time option will typically produce more consistent results, whilst the Offline option will probably result in a faster throughput. The default value is Inherited from the Process Role.
Priority
This is the priority of the Main Thread. Values are from 0 to 31, with 0 being the lowest (or normal) priority. The high default value of 20 allows the main thread (which includes the GUI) to run at a high priority to ensure that the GUI feels responsive to user inputs. If there is no GUI then this value could be reduced. However, raising this priority to increase GUI responsiveness may place this thread at a higher priority than some essential system threads.
Worker Threads Attributes
Cache Size
Memory Cache size allocated for each Worker Thread. Default uses a proportion of the Heap Size depending on the Optimization.
Heap Optimization
Heap Optimization specifies which optimization algorithm should be used, ie for speed 'Fast' or size 'Small'. The default value is Inherited from the Process Role.
Heap Size
Memory Heap size allocated for each Worker Thread. 1 Mb is usually sufficient most applications.
Heap Timeliness
Timeliness controls the way memory is allocated. When set to Real-time, operations are guaranteed to complete within a particular worst case time, whereas Offline operations no deadlines are guaranteed. The Real-time option will typically produce more consistent results, whilst the Offline option will probably result in a faster throughput. The default value is Inherited from the Process Role.
Process Role Attributes
Default Scheduling Attributes
Job Overlap
Root Master, Sub Master Processes
Only
Determines the number of jobs that each slave process can
buffer up. This allows the scheduler to overlap processing and
communication for slave-able applications. If it is set to '1' then jobs
are not sent until existing jobs are completed (no overlap). If it is set
to '2' then a second job can be sent to a given slave whilst it is
processing the first. The bigger the overlap the less likely it is that a
slave is stalled waiting for available work. If the overlap is too high
however, then some slaves could be left with residual tasks whilst adjacent
slaves have completed all of their allocated tasks. The best value is
usually between 2 and 4 but this is probably best optimized empirically.
Definition Attributes
Name
Name of this Processes Role.
Diagnostic Attributes
Output File
This attribute determines the name (and path) of the file that the executing process will use to output diagnostics. If this is set to 'Disabled' then no file will be opened. If it is set to 'Default' then it will use; Slave[id]Diags.txt, SubMaster[id]Diags.txt or RootMasterDiags.txt; depending on the process type and id. Otherwise it needs to be a string in double quotes or a macro that evaluates to a Char* string. Newly created diagnostic files will overwrite earlier files with the same name.
Route to Master
Sub Master, Slave Processes
Only
Determines whether or not slave/sub-master diagnostics
are 'forwarded' to their masters for output. If this attribute is
set to TRUE, then slave diagnostics are automatically copied to their root/sub
masters, and sub-master diagnostics are copied to their root master.
Event Handler Attributes
On Create
User function that is called when all circuitry has been created. The function must take the form void Handler( bool success, void *dialoguePtr ). On entry 'success' will be TRUE if all circuitry was created successfully, or FALSE otherwise; and dialoguePtr will hold the address of the selected dialogue window which was set using the SetCallbackWindow function (see GUI programming). This handler will be executed by the GUI thread.
On Integrate
User function that is called when all circuitry has been integrated. The function must take the form void Handler( bool success, void *dialoguePtr ). On entry 'success' will be TRUE if all circuitry was created successfully, or FALSE otherwise; and dialoguePtr will hold the address of the selected dialogue window which was set using the SetCallbackWindow function (see GUI programming). This handler will be executed by the GUI thread.
On Connect
User function that is called when all circuitry has been connected. The function must take the form void Handler( bool success, void *dialoguePtr ). On entry 'success' will be TRUE if all circuitry was created successfully, or FALSE otherwise; and dialoguePtr will hold the address of the selected dialogue window which was set using the SetCallbackWindow function (see GUI programming). This handler will be executed by the GUI thread.
On Initialize
User function that is called when all circuitry has been initialized. The function must take the form void Handler( bool success, void *dialoguePtr ). On entry 'success' will be TRUE if all circuitry was created successfully, or FALSE otherwise; and dialoguePtr will hold the address of the selected dialogue window which was set using the SetCallbackWindow function (see GUI programming). This handler will be executed by the GUI thread.
On Activate
User function that is called when all circuitry has been activated. The function must take the form void Handler( bool success, void *dialoguePtr ). On entry 'success' will be TRUE if all circuitry was created successfully, or FALSE otherwise; and dialoguePtr will hold the address of the selected dialogue window which was set using the SetCallbackWindow function (see GUI programming). This handler will be executed by the GUI thread.
On Diagnostic
User function that is called each time a diagnostic is issued. If the attribute is set to 'disabled' then no handler will be called, if it is set to 'Default' then the default handler will be called, otherwise it should be set to the name of a function that must take the form; void Handler( char *diag, void *dialoguePtr ).
On Exit
User function that is called when all circuitry has exited. The function must take the form void Handler( bool success, void *dialoguePtr ). On entry 'success' will be TRUE if all circuitry was exited successfully, or FALSE otherwise; and dialoguePtr will hold the address of the selected dialogue window which was set using the SetCallbackWindow function (see GUI programming). This handler will be executed by the GUI thread..
Process Heap Attributes
Cache Size
Memory Cache size allocated for the Process. Default uses a proportion of the Heap Size depending on the Optimization.
Heap Optimization
Heap Optimization specifies which optimization algorithm should be used, ie for speed 'Fast' or size 'Small'.
Heap Size
Memory Heap size allocated for the Process. This is the main memory reserved by CLIP for this applications use.
Heap Timeliness
Timeliness controls the way memory is allocated. When set to Real-time, operations are guaranteed to complete within a particular worst case time, whereas Offline operations no deadlines are guaranteed. The Real-time option will typically produce more consistent results, whilst the Offline option will probably result in a faster throughput
Registrar Attributes
Registrar Address
Not Autonomous Process
This
is the TCP/IP address (or host name) of the CLIP Registrar application. All
CLIP Processes must register with a Registrar, so that other Processes can find
them. However, for most applications the Root-Master Process can act as
the Registrar for itself and its child Processes. Autonomous Processes can
act as Registrar's for themselves. The address 'localhost' is the TCP/IP term
for 'this computer'.
Instance Attributes
Min Slave Count
Root Master, Sub Master Processes
Only
Determines the number of slaves that must connect before
activating circuitry.
Max Slave Count
Root Master, Sub Master Processes
Only
Determines the maximum number of slaves that can connect.
Runtime Attributes
Sub Master Id
Sub Master, Slave Processes
Only
Allows slave processes to identify particular sub-master
processes. Slaves that specify a particular sub-master Id will
connect to sub-masters that specify a matching Id. If this attribute
is set to 0xFFFFFFFF for sub-master processes, then their sub-master id will be
automatically generated (unique value starting from zero), otherwise it will be
set to the specified value. This attribute is specifically provided to
deal with applications that require sub-masters and their slaves to be located
on particular machines (typically governed by configuration files).
Worker Pools
When the CLIP scheduler generates worker threads to handle the Methods, it creates separate threads for each used Method Priority. The attributes for these Threads are inherited from the Process-Worker Thread and Role-Instance Attributes. However, each Priority level can provide its own set of overridden attributes.
Definition Attributes
Name
Name of this Pool.
Priority
Method Priority that this pool is associated with.
Misc Attributes
Cache Size
See Process Role - Cache Size.
Heap Size
See Process Role - Heap Size.
Optimization
See Process Role - Heap Optimization.
Timeliness
See Process Role - Heap Timeliness.
Init Num Workers
See Process - Initial Worker Count.
Max Num Workers
See Process - Max Worker Count.